package main

import (
	"admin/database"
	"admin/router"
	"mime"

	"github.com/gin-gonic/gin"
)

func main() {
	mime.AddExtensionType(".js", "application/javascript")
	mime.AddExtensionType(".css", "text/css; charset=utf-8")
	app := gin.Default()
	// 加载静态文件
	app.Static("/static", "./www/static")
	// 加载数据库
	database.InitDataBase()
	// 加载路由
	router.InitRouter(app)
	app.Run(":8000")
}
